package com.zyx.thread;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        MyThread01 th1 = new MyThread01("花木兰");
        th1.start();
        System.out.println("如果停止运行，请输入: a");
        Scanner sc = new Scanner(System.in);
        String stopped = sc.next();
        if(stopped.trim().equalsIgnoreCase("a")){
            th1.setStopped(true);
        }
    }
}
